home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / GXLayout.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  13.3 KB  |  400 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        GXLayout.h
  3.  
  4.      Contains:    QuickDraw GX layout routine interfaces.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __GXLAYOUT__
  18. #define __GXLAYOUT__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21. #include <ConditionalMacros.h>
  22. #endif
  23. #ifndef __GXTYPES__
  24. #include <GXTypes.h>
  25. #endif
  26.  
  27.  
  28.  
  29. #if PRAGMA_ONCE
  30. #pragma once
  31. #endif
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40.  
  41. #if PRAGMA_STRUCT_ALIGN
  42.     #pragma options align=mac68k
  43. #elif PRAGMA_STRUCT_PACKPUSH
  44.     #pragma pack(push, 2)
  45. #elif PRAGMA_STRUCT_PACK
  46.     #pragma pack(2)
  47. #endif
  48.  
  49. #if defined(__MWERKS__) && TARGET_CPU_68K
  50.     #pragma push
  51.     #pragma pointers_in_D0
  52. #endif
  53.  
  54. EXTERN_API_C( gxShape )
  55. GXNewLayout                        (long                     textRunCount,
  56.                                  const short             textRunLengths[],
  57.                                  const void *            text[],
  58.                                  long                     styleRunCount,
  59.                                  const short             styleRunLengths[],
  60.                                  const gxStyle             styles[],
  61.                                  long                     levelRunCount,
  62.                                  const short             levelRunLengths[],
  63.                                  const short             levels[],
  64.                                  const gxLayoutOptions * layoutOptions,
  65.                                  const gxPoint *        position)                            THREEWORDINLINE(0x303C, 0x0000, 0xA832);
  66.  
  67. EXTERN_API_C( long )
  68. GXGetLayout                        (gxShape                 layout,
  69.                                  void *                    text,
  70.                                  long *                    styleRunCount,
  71.                                  short                     styleRunLengths[],
  72.                                  gxStyle                 styles[],
  73.                                  long *                    levelRunCount,
  74.                                  short                     levelRunLengths[],
  75.                                  short                     levels[],
  76.                                  gxLayoutOptions *        layoutOptions,
  77.                                  gxPoint *                position)                            THREEWORDINLINE(0x303C, 0x0001, 0xA832);
  78.  
  79. EXTERN_API_C( void )
  80. GXSetLayout                        (gxShape                 layout,
  81.                                  long                     textRunCount,
  82.                                  const short             textRunLengths[],
  83.                                  const void *            text[],
  84.                                  long                     styleRunCount,
  85.                                  const short             styleRunLengths[],
  86.                                  const gxStyle             styles[],
  87.                                  long                     levelRunCount,
  88.                                  const short             levelRunLengths[],
  89.                                  const short             levels[],
  90.                                  const gxLayoutOptions * layoutOptions,
  91.                                  const gxPoint *        position)                            THREEWORDINLINE(0x303C, 0x0002, 0xA832);
  92.  
  93. EXTERN_API_C( void )
  94. GXDrawLayout                    (long                     textRunCount,
  95.                                  const short             textRunLengths[],
  96.                                  const void *            text[],
  97.                                  long                     styleRunCount,
  98.                                  const short             styleRunLengths[],
  99.                                  const gxStyle             styles[],
  100.                                  long                     levelRunCount,
  101.                                  const short             levelRunLengths[],
  102.                                  const short             levels[],
  103.                                  const gxLayoutOptions * layoutOptions,
  104.                                  const gxPoint *        position)                            THREEWORDINLINE(0x303C, 0x0003, 0xA832);
  105.  
  106. EXTERN_API_C( void )
  107. GXSetLayoutParts                (gxShape                 layout,
  108.                                  gxByteOffset             oldStartOffset,
  109.                                  gxByteOffset             oldEndOffset,
  110.                                  long                     newTextRunCount,
  111.                                  const short             newTextRunLengths[],
  112.                                  const void *            newText[],
  113.                                  long                     newStyleRunCount,
  114.                                  const short             newStyleRunLengths[],
  115.                                  const gxStyle             newStyles[],
  116.                                  long                     newLevelRunCount,
  117.                                  const short             newLevelRunLengths[],
  118.                                  const short             newLevels[])                            THREEWORDINLINE(0x303C, 0x0004, 0xA832);
  119.  
  120. EXTERN_API_C( void )
  121. GXSetLayoutShapeParts            (gxShape                 layout,
  122.                                  gxByteOffset             startOffset,
  123.                                  gxByteOffset             endOffset,
  124.                                  gxShape                 insert)                                THREEWORDINLINE(0x303C, 0x0005, 0xA832);
  125.  
  126. EXTERN_API_C( long )
  127. GXGetLayoutParts                (gxShape                 layout,
  128.                                  gxByteOffset             startOffset,
  129.                                  gxByteOffset             endOffset,
  130.                                  void *                    text,
  131.                                  long *                    styleRunCount,
  132.                                  short                     styleRunLengths[],
  133.                                  gxStyle                 styles[],
  134.                                  long *                    levelRunCount,
  135.                                  short                     levelRunLengths[],
  136.                                  short                     levels[])                                THREEWORDINLINE(0x303C, 0x0006, 0xA832);
  137.  
  138. EXTERN_API_C( gxShape )
  139. GXGetLayoutShapeParts            (gxShape                 layout,
  140.                                  gxByteOffset             startOffset,
  141.                                  gxByteOffset             endOffset,
  142.                                  gxShape                 dest)                                THREEWORDINLINE(0x303C, 0x0007, 0xA832);
  143.  
  144. EXTERN_API_C( long )
  145. GXGetLayoutGlyphs                (gxShape                 layout,
  146.                                  gxGlyphcode *            glyphs,
  147.                                  gxPoint                 positions[],
  148.                                  long                     advance[],
  149.                                  gxPoint                 tangents[],
  150.                                  long *                    runCount,
  151.                                  short                     styleRuns[],
  152.                                  gxStyle                 glyphStyles[])                        THREEWORDINLINE(0x303C, 0x0008, 0xA832);
  153.  
  154. EXTERN_API_C( gxByteOffset )
  155. GXHitTestLayout                    (gxShape                 layout,
  156.                                  const gxPoint *        hitDown,
  157.                                  gxHighlightType         highlightType,
  158.                                  gxLayoutHitInfo *        hitInfo,
  159.                                  gxShape                 hitTrackingArea)                    THREEWORDINLINE(0x303C, 0x0009, 0xA832);
  160.  
  161. EXTERN_API_C( gxShape )
  162. GXGetLayoutHighlight            (gxShape                 layout,
  163.                                  gxByteOffset             startOffset,
  164.                                  gxByteOffset             endOffset,
  165.                                  gxHighlightType         highlightType,
  166.                                  gxShape                 highlight)                            THREEWORDINLINE(0x303C, 0x000A, 0xA832);
  167.  
  168. EXTERN_API_C( gxShape )
  169. GXGetLayoutVisualHighlight        (gxShape                 layout,
  170.                                  gxByteOffset             startOffset,
  171.                                  long                     startLeadingEdge,
  172.                                  gxByteOffset             endOffset,
  173.                                  long                     endLeadingEdge,
  174.                                  gxHighlightType         highlightType,
  175.                                  gxShape                 highlight)                            THREEWORDINLINE(0x303C, 0x000B, 0xA832);
  176.  
  177. EXTERN_API_C( gxShape )
  178. GXGetLayoutCaret                (gxShape                 layout,
  179.                                  gxByteOffset             offset,
  180.                                  gxHighlightType         highlightType,
  181.                                  gxCaretType             caretType,
  182.                                  gxShape                 caret)                                THREEWORDINLINE(0x303C, 0x000C, 0xA832);
  183.  
  184. EXTERN_API_C( gxByteOffset )
  185. GXGetLayoutBreakOffset            (gxShape                 layout,
  186.                                  gxByteOffset             startOffset,
  187.                                  Fixed                     lineWidth,
  188.                                  long                     hyphenationCount,
  189.                                  const gxByteOffset     hyphenationPoints[],
  190.                                  Boolean *                startIsStaked,
  191.                                  gxByteOffset *            priorStake,
  192.                                  gxByteOffset *            nextStake)                            THREEWORDINLINE(0x303C, 0x000D, 0xA832);
  193.  
  194. EXTERN_API_C( Fixed )
  195. GXGetLayoutRangeWidth            (gxShape                 layout,
  196.                                  gxByteOffset             startOffset,
  197.                                  gxByteOffset             endOffset,
  198.                                  gxShape                 supplementaryText)                    THREEWORDINLINE(0x303C, 0x000E, 0xA832);
  199.  
  200. EXTERN_API_C( gxShape )
  201. GXNewLayoutFromRange            (gxShape                 layout,
  202.                                  gxByteOffset             startOffset,
  203.                                  gxByteOffset             endOffset,
  204.                                  const gxLayoutOptions * layoutOptions,
  205.                                  gxShape                 supplementaryText)                    THREEWORDINLINE(0x303C, 0x000F, 0xA832);
  206.  
  207. EXTERN_API_C( gxShape )
  208. GXGetCaretAngleArea                (gxShape                 layout,
  209.                                  const gxPoint *        hitPoint,
  210.                                  gxHighlightType         highlightType,
  211.                                  gxShape                 caretArea,
  212.                                  short *                returnedRise,
  213.                                  short *                returnedRun)                        THREEWORDINLINE(0x303C, 0x0010, 0xA832);
  214.  
  215. EXTERN_API_C( void )
  216. GXGetStyleBaselineDeltas        (gxStyle                 baseStyle,
  217.                                  gxBaselineType         baseType,
  218.                                  gxBaselineDeltas         returnedDeltas)                        THREEWORDINLINE(0x303C, 0x0011, 0xA832);
  219.  
  220. EXTERN_API_C( gxByteOffset )
  221. GXGetRightVisualOffset            (gxShape                 layout,
  222.                                  gxByteOffset             currentOffset)                        THREEWORDINLINE(0x303C, 0x0012, 0xA832);
  223.  
  224. EXTERN_API_C( gxByteOffset )
  225. GXGetLeftVisualOffset            (gxShape                 layout,
  226.                                  gxByteOffset             currentOffset)                        THREEWORDINLINE(0x303C, 0x0013, 0xA832);
  227.  
  228. EXTERN_API_C( void )
  229. GXGetCompoundCharacterLimits    (gxShape                 layout,
  230.                                  gxByteOffset             trial,
  231.                                  gxByteOffset *            minOffset,
  232.                                  gxByteOffset *            maxOffset,
  233.                                  Boolean *                onBoundary)                            THREEWORDINLINE(0x303C, 0x0014, 0xA832);
  234.  
  235. EXTERN_API_C( void )
  236. GXGetOffsetGlyphs                (gxShape                 layout,
  237.                                  gxByteOffset             trial,
  238.                                  long                     leadingEdge,
  239.                                  gxLayoutOffsetState *    offsetState,
  240.                                  unsigned short *        firstGlyph,
  241.                                  unsigned short *        secondGlyph)                        THREEWORDINLINE(0x303C, 0x0015, 0xA832);
  242.  
  243. EXTERN_API_C( void )
  244. GXGetGlyphOffset                (gxShape                 layout,
  245.                                  long                     trial,
  246.                                  long                     onLeftTop,
  247.                                  gxByteOffset *            offset,
  248.                                  Boolean *                leadingEdge,
  249.                                  Boolean *                wasRealCharacter)                    THREEWORDINLINE(0x303C, 0x0016, 0xA832);
  250.  
  251. EXTERN_API_C( void )
  252. GXGetLayoutSpan                    (gxShape                 layout,
  253.                                  Fixed *                lineAscent,
  254.                                  Fixed *                lineDescent)                        THREEWORDINLINE(0x303C, 0x0017, 0xA832);
  255.  
  256. EXTERN_API_C( void )
  257. GXSetLayoutSpan                    (gxShape                 layout,
  258.                                  Fixed                     lineAscent,
  259.                                  Fixed                     lineDescent)                        THREEWORDINLINE(0x303C, 0x0018, 0xA832);
  260.  
  261. EXTERN_API_C( Fixed )
  262. GXGetLayoutJustificationGap        (gxShape                 layout)                                THREEWORDINLINE(0x303C, 0x0279, 0xA832);
  263.  
  264. EXTERN_API_C( void )
  265. GXGetLayoutJustificationFactors    (gxShape                 layout,
  266.                                  Fixed                     constrainedFactors[],
  267.                                  Fixed                     unconstrainedFactors[])                THREEWORDINLINE(0x303C, 0x027A, 0xA832);
  268.  
  269. EXTERN_API_C( void )
  270. GXSetStyleRunControls            (gxStyle                 target,
  271.                                  const gxRunControls *    runControls)                        THREEWORDINLINE(0x303C, 0x0019, 0xA832);
  272.  
  273. EXTERN_API_C( void )
  274. GXSetStyleRunPriorityJustOverride (gxStyle                 target,
  275.                                  const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x001A, 0xA832);
  276.  
  277. EXTERN_API_C( void )
  278. GXSetStyleRunGlyphJustOverrides    (gxStyle                 target,
  279.                                  long                     count,
  280.                                  const gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x001B, 0xA832);
  281.  
  282. EXTERN_API_C( void )
  283. GXSetStyleRunGlyphSubstitutions    (gxStyle                 target,
  284.                                  long                     count,
  285.                                  const gxGlyphSubstitution  glyphSubstitutions[])                THREEWORDINLINE(0x303C, 0x001C, 0xA832);
  286.  
  287. EXTERN_API_C( void )
  288. GXSetStyleRunFeatures            (gxStyle                 target,
  289.                                  long                     count,
  290.                                  const gxRunFeature     runFeatures[])                        THREEWORDINLINE(0x303C, 0x001D, 0xA832);
  291.  
  292. EXTERN_API_C( void )
  293. GXSetStyleRunKerningAdjustments    (gxStyle                 target,
  294.                                  long                     count,
  295.                                  const gxKerningAdjustment  kerningAdjustments[])                THREEWORDINLINE(0x303C, 0x001E, 0xA832);
  296.  
  297. EXTERN_API_C( void )
  298. GXSetShapeRunControls            (gxShape                 target,
  299.                                  const gxRunControls *    runControls)                        THREEWORDINLINE(0x303C, 0x001F, 0xA832);
  300.  
  301. EXTERN_API_C( void )
  302. GXSetShapeRunPriorityJustOverride (gxShape                 target,
  303.                                  const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0020, 0xA832);
  304.  
  305. EXTERN_API_C( void )
  306. GXSetShapeRunGlyphJustOverrides    (gxShape                 target,
  307.                                  long                     count,
  308.                                  const gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x0021, 0xA832);
  309.  
  310. EXTERN_API_C( void )
  311. GXSetShapeRunGlyphSubstitutions    (gxShape                 target,
  312.                                  long                     count,
  313.                                  const gxGlyphSubstitution  glyphSubstitutions[])                THREEWORDINLINE(0x303C, 0x0022, 0xA832);
  314.  
  315. EXTERN_API_C( void )
  316. GXSetShapeRunFeatures            (gxShape                 target,
  317.                                  long                     count,
  318.                                  const gxRunFeature     runFeatures[])                        THREEWORDINLINE(0x303C, 0x0023, 0xA832);
  319.  
  320. EXTERN_API_C( void )
  321. GXSetShapeRunKerningAdjustments    (gxShape                 target,
  322.                                  long                     count,
  323.                                  const gxKerningAdjustment  kerningAdjustments[])                THREEWORDINLINE(0x303C, 0x0024, 0xA832);
  324.  
  325. EXTERN_API_C( long )
  326. GXGetStyleRunControls            (gxStyle                 source,
  327.                                  gxRunControls *        runControls)                        THREEWORDINLINE(0x303C, 0x0025, 0xA832);
  328.  
  329. EXTERN_API_C( long )
  330. GXGetStyleRunPriorityJustOverride (gxStyle                 source,
  331.                                  gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0026, 0xA832);
  332.  
  333. EXTERN_API_C( long )
  334. GXGetStyleRunGlyphJustOverrides    (gxStyle                 source,
  335.                                  gxGlyphJustificationOverride  glyphJustificationOverrides[])    THREEWORDINLINE(0x303C, 0x0027, 0xA832);
  336.  
  337. EXTERN_API_C( long )
  338. GXGetStyleRunGlyphSubstitutions    (gxStyle                 source,
  339.                                  gxGlyphSubstitution     glyphSubstitutions[])                    THREEWORDINLINE(0x303C, 0x0028, 0xA832);
  340.  
  341. EXTERN_API_C( long )
  342. GXGetStyleRunFeatures            (gxStyle                 source,
  343.                                  gxRunFeature             runFeatures[])                        THREEWORDINLINE(0x303C, 0x0029, 0xA832);
  344.  
  345. EXTERN_API_C( long )
  346. GXGetStyleRunKerningAdjustments    (gxStyle                 source,
  347.                                  gxKerningAdjustment     kerningAdjustments[])                    THREEWORDINLINE(0x303C, 0x002A, 0xA832);
  348.  
  349. EXTERN_API_C( long )
  350. GXGetShapeRunControls            (gxShape                 source,
  351.                                  gxRunControls *        runControls)                        THREEWORDINLINE(0x303C, 0x002B, 0xA832);
  352.  
  353. EXTERN_API_C( long )
  354. GXGetShapeRunPriorityJustOverride (gxShape                 source,
  355.                                  gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x002C, 0xA832);
  356.  
  357. EXTERN_API_C( long )
  358. GXGetShapeRunGlyphJustOverrides    (gxShape                 source,
  359.                                  gxGlyphJustificationOverride  glyphJustificationOverrides[])    THREEWORDINLINE(0x303C, 0x002D, 0xA832);
  360.  
  361. EXTERN_API_C( long )
  362. GXGetShapeRunGlyphSubstitutions    (gxShape                 source,
  363.                                  gxGlyphSubstitution     glyphSubstitutions[])                    THREEWORDINLINE(0x303C, 0x002E, 0xA832);
  364.  
  365. EXTERN_API_C( long )
  366. GXGetShapeRunFeatures            (gxShape                 source,
  367.                                  gxRunFeature             runFeatures[])                        THREEWORDINLINE(0x303C, 0x002F, 0xA832);
  368.  
  369. EXTERN_API_C( long )
  370. GXGetShapeRunKerningAdjustments    (gxShape                 source,
  371.                                  gxKerningAdjustment     kerningAdjustments[])                    THREEWORDINLINE(0x303C, 0x0030, 0xA832);
  372.  
  373.  
  374.  
  375. #if defined(__MWERKS__) && TARGET_CPU_68K
  376.     #pragma pop
  377. #endif
  378.  
  379.  
  380. #if PRAGMA_STRUCT_ALIGN
  381.     #pragma options align=reset
  382. #elif PRAGMA_STRUCT_PACKPUSH
  383.     #pragma pack(pop)
  384. #elif PRAGMA_STRUCT_PACK
  385.     #pragma pack()
  386. #endif
  387.  
  388. #ifdef PRAGMA_IMPORT_OFF
  389. #pragma import off
  390. #elif PRAGMA_IMPORT
  391. #pragma import reset
  392. #endif
  393.  
  394. #ifdef __cplusplus
  395. }
  396. #endif
  397.  
  398. #endif /* __GXLAYOUT__ */
  399.  
  400.